package com.mlf;

import com.mlf.observer.demo.CurrentConditionsDisplay;
import com.mlf.observer.demo.WeatherData;

/**
 * 参考 head first design pattern
 */
public class ObserverDemo {
    public static void main(String[] args) {
        WeatherData weatherData = new WeatherData();
        CurrentConditionsDisplay display = new CurrentConditionsDisplay(weatherData);
        weatherData.setMeasurements(80, 65, 30.4f);
        weatherData.setMeasurements(82, 70, 29.2f);
        weatherData.setMeasurements(78, 90, 29.2f);
    }
}
